package day23;

import java.text.MessageFormat;
import java.text.NumberFormat;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Locale;

public class TestNumberFormat {
	public static void main(String[] args) throws Exception {
		NumberFormat format = NumberFormat.getCurrencyInstance(Locale.GERMAN);
		double d = 12345.678;
		System.out.println(format.format(d));
		String dateStr = "2001-07-04";
		SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
		Date date = dateFormat.parse(dateStr);
		System.out.println(date);
		String msg = MessageFormat.format("Ha{3}He{1}Hai{0}Ho{2}","aa","bb","cc","dd" );
		System.out.println(msg);
		
	}
}
